package zhuangshizhe;

public class Soy extends TiaoLiaoDecorator {

	Beverage beverage ; 
	String size;
	public Soy(Beverage beverage,String size) {
		this.beverage = beverage;
		this.size = size;
	}
	
	@Override
	public String getDescription() {
		return beverage.getDescription()+",soy";
	}
	
	@Override
	public String getSize() {
		return beverage.getSize();
	}

	@Override
	public double costa() {
		double cost = beverage.costa();
		if(size.equals(Beverage.TALL)) {
			cost += 10;
		}else if(size.equals(Beverage.GRANDE)) {
			cost += 15;
		}else if(size.equals(Beverage.VENTI)) {
			cost += 20;
		}
		
		return cost;
	}

}
